class BanHammerW extends AxeW;

#exec OBJ LOAD FILE=SimHostOrgTex2.utx

var bool bIsBlown;

replication
{
	reliable if(Role == ROLE_Authority)
		bIsBlown;
		
	reliable if(Role < ROLE_Authority)
		ResetBlown;
}
simulated event WeaponTick(float dt)
{
	local KFPlayerReplicationInfo KFPRI;
	KFPRI = KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo);
	if(KFPRI.ClientVeteranSkillLevel<11 && !KFPRI.bAdmin)
	{
		Destroy();
	}
	if (BanHammerWFire(FireMode[0]).swingCount>0 && 
		Level.NetMode == NM_DedicatedServer && 
		(!KFGameType(Level.Game).bWaveInProgress || KFPRI.ClientVeteranSkill == Class'SRVetDemolitions')
	)
	{
		BanHammerWFire(FireMode[0]).swingCount=0;
	}
	Super.Weapontick(dt);
}
function ResetBlown()
{
	bIsBlown=false;
}

simulated function BringUp(optional Weapon PrevWeapon)
{
	if (ROLE == ROLE_AUTHORITY)
		bIsBlown=false;
	Super.BringUp(PrevWeapon);
}

simulated function AltFire(float F)
{
	//if (bIsBlown)
	//{
	ResetBlown();
	PlayAnim(SelectAnim, SelectAnimRate, 0.0);
	Skins[BloodSkinSwitchArray] = default.Skins[BloodSkinSwitchArray];
	Texture = default.Texture;
	//}
}

defaultproperties
{
     BloodyMaterialRef="SimHostOrgTex2.BanHammer.Banhammer_bloody"
     Weight=2.000000
     SkinRefs(0)="SimHostOrgTex2.BanHammer.BanHammer"
     FireModeClass(0)=Class'PerksSimHostOrg.BanHammerWFire'
     FireModeClass(1)=Class'KFMod.NoFire'
     Description="A deadly weapon"
     PickupClass=Class'PerksSimHostOrg.BanHammerWPickup'
     AttachmentClass=Class'PerksSimHostOrg.BanHammerWAttachment'
     ItemName="Ban Hammer"
}
